<template>
    <view class="page-content">

        <view class=" p-t-30 width100 m-b-30 view align-center justify-center bg-cover" :style="`background-image: url(${require('@/static/img4/bgd.png')});`">
          <view class="view flex-row align-center text-center rel width100 h52 justify-center" >
			  <view @click="toHome()">
				  <uni-icons style="position: absolute;left: 30rpx;top: 30rpx;" type="left" size="20" color="#fff"></uni-icons>
			  </view>
				<view class="fz-16 c-fff">扫码转账</view>
              <view class="m-r-15"></view>
          </view>

          <view class="view align-center justify-center" style="transform: translateY(110rpx);">
              <view class="fz-20 bold m-b-20 c-fff">扫描二维码付款</view>
              <view class="fz-12 bold m-b-23 c-fff">提示：仅向该地址转入CHB/DSX/YPT相关资产！</view>
              <view class="w192 h192 view align-center justify-center text-center" style="background: #FFFFFF;box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, 0.07);border-radius: 19px;">
                 <ayQrcode ref="qrcode"   />
              </view>
          </view>
        </view>

        <view class="c-3a48 fz-20 m-b-12 text-center bold m-t-80">收款地址</view>
        <view class="c-3a48 fz-12 m-b-40 text-center">{{TopAddressUrl}}</view>

        <view class="p-l-20 p-r-20 m-t-50">
            <el-button  class="btn-c width100 h50 view align-center justify-center" block style="border-radius: 12px !important;font-size:32rpx;display:flex !important;" type="primary" @click="copyVal">复制收款账户</el-button>
        </view>
        
    </view>
</template>

<script>
import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue"
import uniIcons from "@/components/uni-icons/uni-icons"
import { mapState } from 'vuex'
export default {
    components: {
      ayQrcode,
      uniIcons
		},
    data() {
        return {
          btnLoading: false,
          TopAddress : '',
          TopAddressUrl: '',
          
        }
    },
    mounted() {
      this.getInvCode()
      
    },
    computed: {
			...mapState(['defaultWallet']),
		},
    methods: {
      back() {
        uni.navigateBack();
      },
      copyVal () {
          this.app.copy(this.TopAddressUrl)
      },
     getInvCode() {
       this.TopAddressUrl = this.defaultWallet.address
       this.$refs.qrcode.couponQrCode(this.TopAddressUrl)
     },
	 toHome(){
		 uni.reLaunch({
		     url: '/pages/home/index',
		 });
	 }
    }
};
</script>

<style lang="scss" scoped>

page {
  background-color: #f6f6f6;
  box-sizing: border-box;
  overflow-y: hidden;
}
.right-set {
    position: absolute;
    right: 0;
    top: 0;
    width: 40rpx;
    height: 24rpx;
    display: none;
}
::v-deep .us-input {
     .uni-easyinput__content-input {
        
        padding-left:  0 !important;
    }
}

.b-b-1 {border-bottom: 1px solid #EDEDED;}
.b--all-1 {border: 1px solid #C4C4C4;}
.bo {
  border: 2px solid #343438;
}
.us-input {width: 100%;border-bottom: 0px;}
.show-detail {
  border-radius: 60rpx;
}
/deep/.auto-h {
  height: calc(100vh - 220rpx) !important;
}
.autoH {
  height: calc(100vh - 220rpx);
}
.bor-line {
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.3;
  height: 1px;
}
.active {
    border-color: #6781FF !important;
    .boc {border-color: #6781FF !important;background: #6781FF;color: #fff !important;}
    .right-set {display: flex;}
}
/deep/.auto-h {
  height: calc(100vh - 90rpx) !important;
}
.bgs {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
</style>
